package me.yricky.mayu.utils.misc

/**
 * @author Yricky
 * @date 2022/4/22
 */

inline fun <T1,T2,R> reduceNullable(arg1:T1?, arg2:T2?, action:(T1, T2)->R):R?{
    return if(arg1 != null && arg2 != null){
        action(arg1,arg2)
    }else{
        null
    }
}